extends Node2D
const radius:=300
var weaponFactor=preload('res://场景/物品/武器/武器.tscn')


func _ready():
	addWeapon()
	pass

func putWeapon():
	var num=get_child_count()
	var unit=TAU/num # TAU=2*PI
	var weapons=get_children()

	for i in len(weapons):
		var weapon=weapons[i]
		var rad=unit*i
		# 以radius为半径均布
		var pos=Vector2(radius,0).rotated(rad)
		weapon.position=pos
	pass

func addWeapon():
	add_child(weaponFactor.instantiate())
	putWeapon()


func _on_round_end(rounds) -> void:
	if rounds%1==0:
		addWeapon()
